<template>
  <div>
    <BasicTable @register="registerTable" />
  </div>
</template>
<script lang="ts" setup>
  import { getAdminLog } from '@/api/system/account';
  import { columns, searchFormSchema } from './log.data';
  import { BasicTable, useTable } from '@/components/Table';

  const [registerTable] = useTable({
    title: '操作日志',
    api: getAdminLog,
    columns,
    formConfig: {
      labelWidth: 80,
      schemas: searchFormSchema,
      showAdvancedButton: false,
      actionColOptions: {
        span: 5,
        style: { marginLeft: '20px' },
      },
    },
    ellipsis: false,
    useSearchForm: true,
    showTableSetting: false,
    bordered: true,
    showIndexColumn: false,
    resizeHeightOffset: 25,
    fetchSetting: {
      // The field name of the current page passed to the background
      pageField: 'page',
      // The number field name of each page displayed in the background
      sizeField: 'pageSize',
      // Field name of the form data returned by the interface
      listField: 'list',
      // Total number of tables returned by the interface field name
      totalField: 'pagination.total',
    },
  });
</script>
